export type UserInfo = {
  id: string;
  name: string;
  avatarUrl: string,
}
export type QuestionQuery = {
  search?: string | null;
  tag?: string | null,
  page?: number;
  size?: number;
  creator?: string;
}
export type Question = {
  id?: string;
  title?: string;
  creator?: string;
  description?: string;
  tag?: string;
  viewCount?: string;
  commentCount?: string;
  likeCount?: string;
  gmtCreate?: string;
  creatorAvatar?: string;
  creatorName?: string,
  likeType?: number;
}
export type QuestionPage = {
  records?: Question[]; // 查询到的记录数
  total?: string; // 总记录数
  size?: string; // 每页显示的记录数
  current?: string; // 当前页码
  searchCount?: boolean; // 是否计算查询记录数
  pages?: string; // 分页数
  tag?: string;
  search?: string;
  creatorName?: string,
  creator?: string,
}
export type HotTag = {
  tagName?: string;
  priority?: number;
  questionCount?: number;
  replies?: number;
}
export type QuestionInfo = {
  detail?: Question;
  related?: Array<Question>;
}
export type PageInfo<T> = {
  records?: T[];
  current?: number;
  size?: number;
  total?: string;
  pages?: number;
  totalComments?: string,
}
export type CommentInfo = {
  id: string;
  parentId?: string;
  commenter?: string;
  type?: number;
  gmtCreate?: string;
  gmtModify?: string;
  likeCount?: string;
  likedStatus?: number;
  content?: string;
  commenterName?: string;
  commenterAvatar?: string;
  subCommentCount?: string;
}
export type PraiseParam = {
  status?: number;
  likeId?: string;
  type?: number;
};
export type CommentParam = {
  content?: string;
  parentId?: string; // 这里假设 parentId 是 Long 类型，将其转换为 number
  type?: number; // 这里假设 type 是 Short 类型，将其转换为 number
};
export type CommentPageParam = {
  current?: number;
  size?: number;
  type?: number;
  pid?: string;
}
export type SubCommentInfo = {
  subComments: PageInfo<CommentInfo>;
  queryStatus: 'loading' | 'success' | 'fail';
  expanded: boolean,
  lastComment?: string,
}
export type SubCommentCache = {
  [key: string]: SubCommentInfo
}
export type TagInfo = {
  categoryId?: number;
  categoryName?: string;
  tags?: string[];
}